<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="./Promise.js?a=1"></script>
    <script>
        // 1- 可以指定多个成功回调或失败回调.
        const p1 = new Promise((resolve,reject)=>{
            setTimeout(()=>{
                reject(100);
            },1000)
        })
        p1.then(value=>{
            console.log("成功回调1",value);// 100
        },reason=>{
            console.log("失败回调1",reason);// 100
        })

        p1.then(value=>{
            console.log("成功回调2",value);// 100
        },reason=>{
            console.log("失败回调2",reason);// 100
        })

        p1.then(value=>{
            console.log("成功回调3",value);// 100
        },reason=>{
            console.log("失败回调3",reason);// 100
        })

        p1.then(value=>{
            console.log("成功回调4",value);// 100
        },reason=>{
            console.log("失败回调4",reason);// 100
        })
    </script>
</body>
</html>